<template>
  <div>
    <!--列表-->
    <FilterTable ref="examine" :fetchapi="fetchApi" :columns="examine" :params="fetchParams" :datakey="'rows'" :onColumnsChange="examine => (this.examine = examine)" :isSelectColumn="false" />
  </div>
</template>
<script>
// 引入请求地址
import { getPDIAuditLog } from '@/api/repair/otherBusiness/maintainPDI/index';

export default {
  // 获取审批单ID
  props: ['id'],
  data() {
    return {
      // 表单数据
      examine: this.getexamine(),
      fetchParams: { mainId: this.id },
      fetchApi: getPDIAuditLog
    };
  },
  methods: {
    /** 返回表单对象 */
    getexamine() {
      return [
        {
          title: '审核人',
          dataIndex: 'auditBy',
          sorter: true,
          filter: true,
          filterType: 'input',
          width: 200,
          render: props => {
            return <span>{props.row.auditBy}</span>;
          }
        },
        {
          title: '审核日期',
          dataIndex: 'auditTime',
          sorter: true,
          filter: true,
          filterType: 'input',
          width: 200,
          render: props => {
            return <span>{props.row.auditTime}</span>;
          }
        },
        {
          title: '审核备注',
          dataIndex: 'auditRemark',
          sorter: true,
          filter: true,
          filterType: 'input',
          width: 200,
          render: props => {
            return <span>{props.row.auditRemark}</span>;
          }
        },
        {
          title: '审核说明',
          dataIndex: 'auditInstructions',
          sorter: true,
          filter: true,
          filterType: 'input',
          render: props => {
            return <span>{props.row.auditInstructions}</span>;
          }
        }
      ];
    }
  }
};
</script>
